1. Field Of The Invention
This invention relates to memory allocation methods and, more particularly, to methods for allocating display memory which is not storing visible pixel data.
2. History Of The Prior Art
A typical computer system generates data which is displayed on an output display. This output display is most often a cathode ray tube which displays a number of full screen images one after another so rapidly that to the eye of the viewer the screen appears to display constant motion when a program being displayed produces such motion.
In order to produce the individual images (frames) which are displayed one after another, data is written into a frame buffer. The frame buffer stores information about each position on the display which can be illuminated (each picture element or pixel) to produce the full screen image. For example, a particular display may be capable of displaying pixels in approximately one thousand horizontal rows each having approximately one thousand pixels. All of this information is stored in the frame buffer where it can be repeatedly scanned to the display.
Typically, data is transferred from the frame buffer to the display pixel by pixel and line by line beginning at the upper left hand corner of the display and proceeding horizontally from left to right, line by line, downwardly to the lower right hand corner of the display. This process is called raster scanning. In order for the picture to appear continuous on the output display, the successive frames in the frame buffer are constantly scanned to the output display at a rate of sixty frames per second or more.
While each frame of data is being scanned to the display, any new data to appear in the next frame must be transferred to the frame buffer. New data to be displayed in a frame may be written to the portion of the frame buffer being changed at any time. In order to allow information to be both written to the frame buffer and scanned from the frame buffer to the output display simultaneously, two ported video random access memory (VRAM) is typically used for the frame buffer. Data is written to the frame buffer through one port and scanned to the display through the other.
If data is being placed in a frame buffer at the same time that information is being scanned to the display, it is possible that information being scanned to the display will come from two time displaced frames. For example, if scanning is proceeding at a faster rate than data is being written to the frame buffer and a portion of the frame buffer which is changing (being written) is scanned to the display, a portion of the display will be from what should be a first frame and a portion from what should be a succeeding frame. The display of portions of two time displaced frames simultaneously can be disconcerting where the display is rapidly changing as in real time video. It may produce images which are grossly distorted and are referred to as frame tears.
In order to eliminate frame tears, double buffered display memory may be used. Double buffering uses two complete frame buffers each of which may store one entire frame. Data is written to one frame buffer and scanned to the display from the other frame buffer. Since data is never written to a frame buffer from which data is being scanned to the display, frame tears cannot occur. Double buffering is typically used with programs which present rapidly changing data on the output display.
Not all programs need to utilize the facilities offered by double buffered display systems. Typical examples are programs which produce primarily text or limited two dimensional graphics output. When such programs are running on a computer having the facilities to accomplish double buffering and double buffering is inactive, a significant amount of especially expensive frame buffer memory is unused. Because this memory is closely associated with the output display, it is in an excellent position to be used for off-screen storage of information related to the display. For example, this memory may be used to store currently invisible information from windows which have portions that are presently covered by other windows being displayed. This memory is especially useful where a graphics accelerator is used with the display to eliminate the delays which are incurred when the usually slower central processor must update the display because it allows the graphics accelerator to manipulate data which would otherwise have to be stored in system memory and manipulated by the central processor. This is especially important where the frame buffer offers an especially large amount of excess memory such as is the case with unused double buffering space. In a particular arrangement, almost three megabytes of frame buffer memory are available for off-screen use; this offers a substantial amount of memory for information that need not be transferred back to system memory with the delay inherent to such transfers.
Of course, the excess display memory is only useful if it may be used with sufficient efficiency that the rendering of information on the display by the graphics accelerator and other system maintenance operations are not delayed. One of the necessary steps in the utilization of any memory is to allocate the different portions of that memory to the various uses to which it may be put. Because of the very great amount and rapidly changing nature of information which must be provided to operate an advanced color output display in a multitasking environment, if the allocation process is slow, then the operation of displaying information on the output display may be slowed. In an extreme case, the operation of the entire computer system may be slowed waiting for memory allocation. Prior art processes have not been fast enough to allow extra memory available in a frame buffer to be used to store off-screen data in such an environment.